package com.atguigu.ssm.service.impl;

import com.atguigu.ssm.mapper.UserMapper;
import com.atguigu.ssm.pojo.User;
import com.atguigu.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: ssm_demo
 * @author: Mr.Zhuo
 * @create: 2022-04-15 14:07
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 登录
     *
     * @param user
     * @return
     */
    @Override
    public Boolean login(User user) {

        int flag = userMapper.select(user);

        if (flag >= 1) {
            return true;
        } else {
            return false;

        }
    }
}
